-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(compiler-cli): move the expression expression type checker #16562
Conversation
|
||
export interface ExpressionDiagnosticsContext { event?: boolean; } | ||
|
||
export enum DiagnosticKind { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving this out of this file as it seems more general than the scope of this file.
return result; | ||
} | ||
|
||
export function getExpressionScope( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, never mind.
packages/compiler-cli/index.ts
Outdated
export {DiagnosticTemplateInfo, ExpressionDiagnostic, getExpressionDiagnostics, getExpressionScope, getTemplateExpressionDiagnostics} from './src/diagnostics/expression_diagnostics'; | ||
export {AstType, ExpressionDiagnosticsContext, TypeDiagnostic} from './src/diagnostics/expression_type'; | ||
export {BuiltinType, DeclarationKind, Definition, PipeInfo, Pipes, Signature, Span, Symbol, SymbolDeclaration, SymbolQuery, SymbolTable} from './src/diagnostics/symbols'; | ||
export {getClassFromStaticSymbol, getClassMembers, getClassMembersFromDeclaration, getPipesTable, getSymbolQuery} from './src/diagnostics/typescript_symbols'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These exports are only used for tests, right? Consider using a deep import in the tests then.
This way it is clearer which methods are supposed to be used (e.g. by the language service) and which ones are just helpers.
import {getExpressionDiagnostics, getExpressionScope} from './expressions'; | ||
import {HtmlAstPath} from './html_path'; | ||
import {NullTemplateVisitor, TemplateAstChildVisitor, TemplateAstPath} from './template_path'; | ||
import {getExpressionDiagnostics} from './expressions'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also exists in the compiler-cli now, did you forget to delete it from the language service?
a1cc5c9
to
0dbda8a
Compare
The expression type checker moved from the language service to the compiler-cli in preparation to using it to check template expressions.
0dbda8a
to
1b6a93d
Compare
…ngular#16562) The expression type checker moved from the language service to the compiler-cli in preparation to using it to check template expressions.
…ngular#16562) The expression type checker moved from the language service to the compiler-cli in preparation to using it to check template expressions.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The expression type checker moved from the language service
to the compiler-cli in preparation to using it to check
template expressions.
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here)
The template type checker is part of the language service.
What is the new behavior?
The template type checker is part of the compiler cli.
Does this PR introduce a breaking change? (check one with "x")